Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added pid filtering searchbox and selection counter in snapshot download popup #5627

Merged
merged 12 commits into from
Jan 7, 2025

Conversation

sfiorani
Copy link
Contributor

@sfiorani sfiorani commented Dec 19, 2024

This PR updates what was contributed in #5617 with the following updates:

  • Added a searchbox in the snapshot download popup that allows filtering the pids in the checboxes list to easily find the desired ones
  • Updated the anchor that select/remove all selections, so when the pid list is filtered with the search box, the anchor select/remove all the filtered and visible checkboxes
  • Added a label at the right that indicates the number of pids selected over the total number
  • Imrpved the backend that filters the pids checkboxes

image
image

Related Issue: This PR fixes/closes {issue number}

Description of the solution adopted: A more detailed description of the changes made to solve/close one or more issues. If the PR is simple and easy to understand this section can be skipped

Screenshots: If applicable, add screenshots to help explain your solution

Manual Tests: Optional description of the tests performed to check correct functioning of changes, useful for an efficient review

Any side note on the changes made: Description of any other change that has been made, which is not directly linked to the issue resolution [e.g. Code clean up/Sonar issue resolution]

@sfiorani sfiorani changed the title feat: added pid filtering searchbox in snapshot download popup feat: added pid filtering searchbox and selection counter in snapshot download popup Dec 23, 2024
@MMaiero MMaiero self-requested a review January 7, 2025 08:06
@@ -0,0 +1,26 @@
package org.eclipse.kura.web.client.ui.settings;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add copyright header

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can already put 2025 at this point.

@@ -316,7 +316,10 @@ downloadSnapshotXmlButton=Download as XML
downloadSnapshotJsonButton=Download as JSON
downloadSnapshotError=Please select at least one pid from the list
selectAllAnchorText=Select All Pids
selectAllVisibleAnchorText=Select All Visible Pids
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need to get consistent on how we display PIDs. In some places is PIDs, in others is Pids

I believe we need to converge to PIDs

pids

@MMaiero
Copy link
Contributor

MMaiero commented Jan 7, 2025

A potential corner case that I've found is related to when the session is ended. You can still select the snapshot and perform your actions to try to download. But after clicking on the download as button, you get no output or feedback.
Is it possible to intercept this case?
Maybe displaying an error or such. It's also strange that there is no redirect to the login page as per other sections of the UI. Maybe we need a bit of alignment there...

@sfiorani
Copy link
Contributor Author

sfiorani commented Jan 7, 2025

A potential corner case that I've found is related to when the session is ended. You can still select the snapshot and perform your actions to try to download. But after clicking on the download as button, you get no output or feedback. Is it possible to intercept this case? Maybe displaying an error or such. It's also strange that there is no redirect to the login page as per other sections of the UI. Maybe we need a bit of alignment there...

Yes I can reproduce this wrong behaviour. However, I have already a PR which follows this one and migrates all the snapshot download requests from GET to POST ones. This new mechanism will generate a new token for each download, preventing this situation and triggering the "Session expiration" popup. This will align the snapshot download failure to what happens in the rest of the framework

sfiorani and others added 2 commits January 7, 2025 11:10
…client/ui/settings/SnapshotDownloadModal.java

Co-authored-by: Matteo Maiero <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
@MMaiero MMaiero merged commit 86c2298 into eclipse-kura:develop Jan 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants